import request from '@/utils/request'

export default {
  // 4.根据id查询课时
  getVideo(videoId) {
    return request({
      url: `/admin/edu/video/get/${videoId}`,
      method: 'get'
    })
  },
  // 5.更新课时
  updateVideo(video) {
    return request({
      url: '/admin/edu/video/update',
      method: 'put',
      data: video
    })
  },
  // 3.删除课时
  removeVideo(videoId) {
    return request({
      url: `/admin/edu/video/remove/${videoId}`,
      method: 'delete'
    })
  },
  // 1.新增课时
  saveVideo(video) {
    return request({
      url: '/admin/edu/video/save',
      method: 'post',
      data: video
    })
  }
}
